#include "reg52.h"
#include "intrins.h"
sbit led_one = P3^7;
sbit led_two = P3^6;
sbit shake = P3^3;
sbit relay = P3^4;




void Delay2000ms()		//@11.0592MHz
{
	unsigned char i, j, k;

	_nop_();
	i = 15;
	j = 2;
	k = 235;
	do
	{
		do
		{
			while (--k);
		} while (--j);
	} while (--i);
}

int main()
{
	while(1){

	if(shake == 0){
		relay = 0;
		Delay2000ms();
		
	}else{
		relay =1;
	}

	}


	return 0;
}